#打开 https://www.12306.cn/index/
import time
from base import Base
from selenium.webdriver.common.by import By
class Test_search_data(Base):
    def test_search_time(self):
        self.driver.get('https://www.12306.cn/index/')
        #self.driver.find_element(By.ID,'fromStationText').send_keys('北京')
        #self.driver.find_element(By.ID, 'toStationText').send_keys('内蒙古')
        remove_time = "document.getElementById('train_date').removeAttribute('readonly')"
        self.driver.execute_script(remove_time)
        time.sleep(3)
        set_date = "document.getElementById('train_date').value='2022-12-01'"
        self.driver.execute_script(set_date)
        time.sleep(2)
        self.driver.find_element(By.ID,'search_one').click()
        time.sleep(5)